package com.demo.salary.transactionimplementation;

import com.demo.salary.abstracttransactions.AddEmployeeTransaction;
import com.demo.salary.payrollimplementation.BiweeklySchedule;
import com.demo.salary.payrolldomain.PaymentClassification;
import com.demo.salary.payrolldomain.PaymentSchedule;
import com.demo.salary.payrollimplementation.CommissionedClassification;

public class AddCommissionedEmployee extends AddEmployeeTransaction {

    double commissionRate;
    double salary;

    public AddCommissionedEmployee(int empId, String name, String address, double commissionRate, double salary) {
        super(empId, name, address);
        this.commissionRate = commissionRate;
        this.salary = salary;
    }

    public double getCommissionRate() {
        return commissionRate;
    }

    public double getSalary() {
        return salary;
    }

    @Override
    PaymentClassification getClassification() {
        return new CommissionedClassification(commissionRate, salary);
    }

    @Override
    PaymentSchedule getSchedule() {
        return new BiweeklySchedule();
    }
}
